<div class="services_wrapper">
    <ul class="tabs">
        <li>
            <a href="#" class="services_home">
            <span>Home</span>
            </a>
        </li>
        <li>
            <a href="#" class="services_commercial">
                <span>Commercial</span>
            </a>
        </li>
    </ul>

    <!-- tab "panes" -->
    <div class="panes">
        <!-- first tab -->
        <div>
            <div class="pane_wrapper">
                <div class="pane_wrapper_left">
                    <div class="pane_left_header">
                        Book online :
                    </div>
                    <div class="pane_left_nav">
                        <ul>
                            <li><a href="#paneContainer">One time cleaning</a></li>
                            <li><a href="#paneContainer2">Recurring cleaning</a></li>
                            <li><a href="#paneContainer3">General cleaning</a></li>
                            <li><a href="#paneContainer4">Move in / out cleaning</a></li>
                            <li><a href="#paneContainer5">Post construction cleaning</a></li>
                            <li><a href="#paneContainer7">After-party cleaning</a></li>
                            <li><a href="#paneContainer6">Seasonal cleaning</a></li>
                        </ul>
                    </div>
                    <div class="pane_left_bottom">
                        Click on the cleaning type you need, fill in the form and our manager will contact you
                    </div>
                </div>

                <div class="pane_wrapper_right">

                    <? if(!empty($homeTopText['text1'])) : ?>

                        <div class="pane_tab_header_top_text">
                            <?=$homeTopText['text1'];?>
                        </div>

                    <? endif ?>


                    <? if(!empty($homeBlocks)) : ?>

                        <? foreach ($homeBlocks as $block) : ?>

                            <div class="pane_right_block">
                                <div class="pane_right_block_header"><?=$block['name']?></div>
                                <ul>
                                    <? $liElements = explode(";",$block['text1']);?>
                                    <? foreach($liElements as $li) : ?>
                                        <li><?=$li ?></li>
                                    <? endforeach; ?>
                                </ul>
                            </div>

                        <? endforeach; ?>

                    <? endif; ?>

                </div>
            </div>
        </div>
        <!--second tab-->
        <div style="display: none;">
            <div class="pane_wrapper">
                <div class="pane_wrapper_left">
                    <div class="pane_left_header">
                        Book online :
                    </div>
                    <div class="pane_left_nav">
                        <ul>
                            <li><a href="#paneContainer8">One time cleaning</a></li>
                            <li><a href="#paneContainer9">Recurring cleaning</a></li>
                            <li><a href="#paneContainer10">General cleaning</a></li>
                            <li><a href="#paneContainer11">Move in / out cleaning</a></li>
                            <li><a href="#paneContainer12">Post construction cleaning</a></li>
                            <li><a href="#paneContainer13">After-party cleaning</a></li>
                            <li><a href="#paneContainer14">Seasonal cleaning</a></li>
                        </ul>
                    </div>
                    <div class="pane_left_bottom">
                        Click on the cleaning type you need, fill in the form and our manager will contact you
                    </div>
                </div>

                <div class="pane_wrapper_right">

                    <? if(!empty($commTopText['text1'])) : ?>

                        <div class="pane_tab_header_top_text">
                            <?=$commTopText['text1'];?>
                        </div>

                    <? endif ?>

                    <? if(!empty($commercBlocks)) : ?>

                    <? foreach ($commercBlocks as $block) : ?>

                        <div class="pane_right_block">
                            <div class="pane_right_block_header"><?=$block['name']?></div>
                            <ul>
                                <? $liElements = explode(";",$block['text1']);?>
                                <? foreach($liElements as $li) : ?>
                                <li><?=$li ?></li>
                                <? endforeach; ?>
                            </ul>
                        </div>

                        <? endforeach; ?>

                    <? endif; ?>

                </div>
            </div>
        </div>
    </div>
</div>


<!--================FIRST FORM RENDER===========================================================-->
<div id="paneContainer" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form->renderBound('begin')?>
                <?=$form->render('main_services_info');?>
                <?=$form->render('main_services_details');?>
                <?=$form->render('main_services_names');?>
<!--                --><?//=$form->render('submit');?>
            <?=$form->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>
<!--================SECOND FORM RENDER===========================================================-->
<div id="paneContainer2" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form2->renderBound('begin')?>
                <?=$form2->render('main_services_info');?>
                <?=$form2->render('main_services_details');?>
                <?=$form2->render('main_services_names');?>
<!--                --><?//=$form2->render('submit');?>
            <?=$form2->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>

<!--================THIRD FORM RENDER===========================================================-->
<div id="paneContainer3" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form3->renderBound('begin')?>
            <?=$form3->render('main_services_info');?>
            <?=$form3->render('main_services_details');?>
            <?=$form3->render('main_services_names');?>
<!--            --><?//=$form3->render('submit');?>
            <?=$form3->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>
<!--================FOURTH FORM RENDER===========================================================-->
<div id="paneContainer4" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form4->renderBound('begin')?>
                <?=$form4->render('main_services_info');?>
                <?=$form4->render('main_services_details');?>
                <?=$form4->render('main_services_names');?>
<!--                --><?//=$form4->render('submit');?>
            <?=$form4->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>
<!--================FIFTH FORM RENDER===========================================================-->
<div id="paneContainer5" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form5->renderBound('begin')?>
                <?=$form5->render('main_services_info');?>
                <?=$form5->render('main_services_details');?>
                <?=$form5->render('main_services_names');?>
<!--                --><?//=$form5->render('submit');?>
            <?=$form5->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>
<!--================SIXTH FORM RENDER===========================================================-->
<div id="paneContainer6" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form6->renderBound('begin')?>
                <?=$form6->render('main_services_info');?>
                <?=$form6->render('main_services_details');?>
                <?=$form6->render('main_services_names');?>
<!--                --><?//=$form6->render('submit');?>
            <?=$form6->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>
<!--================SEVENTH FORM RENDER===========================================================-->
<div id="paneContainer7" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form7->renderBound('begin')?>
                <?=$form7->render('main_services_info');?>
                <?=$form7->render('main_services_details');?>
                <?=$form7->render('main_services_names');?>
<!--                --><?//=$form7->render('submit');?>
            <?=$form7->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>

    <!--=========================COMMERCIAL ====================================================-->

<!--================EIGTHS FORM RENDER===========================================================-->
<div id="paneContainer8" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form8->renderBound('begin')?>
            <?=$form8->render('main_services_info');?>
            <?=$form8->render('main_services_more');?>
            <?=$form8->render('main_services_details');?>
            <?=$form8->render('main_services_names');?>

            <?=$form8->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>

<!--================NINES FORM RENDER===========================================================-->
<div id="paneContainer9" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form9->renderBound('begin')?>
                <?=$form9->render('main_services_info');?>
                <?=$form9->render('main_services_details');?>
                <?=$form9->render('main_services_names');?>

            <?=$form9->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>

<!--================TENS FORM RENDER===========================================================-->
<div id="paneContainer10" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form10->renderBound('begin')?>
            <?=$form10->render('main_services_info');?>
            <?=$form10->render('main_services_details');?>
            <?=$form10->render('main_services_names');?>

            <?=$form10->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>

<!--================ELEVENTH FORM RENDER===========================================================-->
<div id="paneContainer11" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form11->renderBound('begin')?>
                <?=$form11->render('main_services_info');?>
                <?=$form11->render('main_services_details');?>
                <?=$form11->render('main_services_names');?>
            <?=$form11->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>

<!--================TWELVETH FORM RENDER===========================================================-->
<div id="paneContainer12" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form12->renderBound('begin')?>
                <?=$form12->render('main_services_info');?>
                <?=$form12->render('main_services_details');?>
                <?=$form12->render('main_services_names');?>
            <?=$form12->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>

<!--================THIRTEENTH FORM RENDER===========================================================-->
<div id="paneContainer13" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form13->renderBound('begin')?>
                <?=$form13->render('main_services_info');?>
                <?=$form13->render('main_services_details');?>
                <?=$form13->render('main_services_names');?>
            <?=$form13->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>

<!--================THIRTEENTH FORM RENDER===========================================================-->
<div id="paneContainer14" style="display: none;">
    <div class="services_form_wrapper">
        <div class="services_form_header">
            <div>Book Online Form</div>
        </div>

        <div class="services_form_underheader">
            <div>Please answer a few questions and we'll process your order immediately</div>
        </div>

        <div class="services_form_content">
            <?=$form14->renderBound('begin')?>
                <?=$form14->render('main_services_info');?>
                <?=$form14->render('main_services_details');?>
                <?=$form14->render('main_services_names');?>
            <?=$form14->renderBound('end')?>
        </div>

        <div class="services_form_bottom">
            <div class="services_form_arrow services_back"></div>
            <div class="services_form_paginator"></div>
            <div class="services_form_arrow services_next"></div>
        </div>

        <div class="services_form_footer"></div>
    </div>
</div>
<!--================END OF FORM RENDER===========================================================-->



<script type="text/javascript">
    //form styling

//    var inpTexts = $('input[type=text]'),
//        formIsue = inpTexts.parent().parent(),
//        fieldset = formIsue.parent().parent(),
//        submitIssue = $('input[type=submit]').parent().parent();
//
//    formIsue.css({'float':'left','width':'50%'});
//    submitIssue.css({'float':'left'});
//
//    fieldset.each(function(){
//        $(this).find('input[type=text]').filter(':odd').parent().parent().css({'padding-left':'3%','width':'47%'});
//    });





    //form styling end


    //tabs script firing
    $(function() {
        $("ul.tabs").tabs("div.panes > div");
    });

    //FORM fancybox script
    $('.pane_left_nav ul li a').fancybox({
        fitToView       : false,
        width           : 580,
        height          : 490,
        href            : $(this).attr('href'),
        autoSize        : false,
        closeClick      : false,
        openEffect      : 'elastic',
        closeEffect     : 'elastic',
        closeBtn        : false,
        padding         : 0
    });

    //FORM slider script firing

</script>

<!--<script type="text/javascript">-->
<!--    $(function()-->
<!--    {-->
<!--        $('.services_form_content').jScrollPane({autoReinitialise:true,scrollbarWidth:5,verticalDragMaxHeight:50,verticalDragMinHeight:25,contentWidth:540});-->
<!--    });-->
<!--</script>-->



<script type="text/javascript">
    $('.pane_left_nav ul li a').unbind('click').bind('click', $.fn.requestForm);
</script>


<? if(isset($_SESSION['form_error'])) : ?>
    <script type="text/javascript">

       var errorblock = $('form .form_errors').first(),
           paren = errorblock.parent().parent().parent().parent().parent().parent().parent().parent().parent().parent(),
           atrib = paren.attr('id');

        $('a[href="#'+atrib+'"]').trigger('click');

    </script>
<? endif; ?>

